package com.bwie.vo;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author 军哥
 * @version 1.0
 * @description: TODO
 * @date 2025/5/21 13:49
 */

@Data
public class LoginVo implements Serializable {
    @NotBlank(message = "用户名不能为空")
    @Size(min = 6, message = "用户名长度不能小于6位")
    private String userName;

    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^(?=.*\\d)(?=.*[a-zA-Z])[a-zA-Z0-9]{6,}$", message = "密码不能小于6位，并且必须包含字母和数字")
    private String userPass;
}
